package cn.wolfcode.wolf2w.repository;

import cn.wolfcode.wolf2w.domain.UserInfo;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * 用户持久化操作接口
 */
public interface UserInfoRepsitory extends MongoRepository<UserInfo, String> {

    /**
     * 通过手机号查询用户对象
     * @param phone
     * @return
     */
    UserInfo findByPhone(String phone);

    /**
     * 通过city查询用户
     * @param destName
     * @return
     */
    List<UserInfo> findByCity(String destName);
}
